<?php
/**
 * User: onwer
 * Date: 12-4-7
 * Time: 上午12:46
 */
?>
<?php
    $actarr=array('目录'=>'opendir','文件'=>'openfile');
?>
<h2 class="formdesc">
    当前目录：
    <?php
    foreach ($fileManage->curdir as $dir) {
        printf('<a href="editfile.php?act=%s&curdir=%s&name=%s">%s</a> ',
            $actarr['目录'],
            $dir['parent'],
            $dir['name'],
            $dir['name']);
    }

    ?>
</h2>

<table class="table1">
    <thead>
    <tr>

        <th>类型</th>
        <th>名字</th>
        <th>修改时间</th>
    </tr>
    </thead>
    <tbody>
    <?php
        $i=0; $classname=array('odd','even');
       foreach ($filearr as $val) {
           printf('<tr class="%s">
                   <td>%s：</td>
                   <td><a href="editfile.php?act=%s&curdir=%s&name=%s">%s</a></td>
                   <td>%s</td>
                </tr>',
               $classname[$i++%2],
               $val['type'],
               $actarr[$val['type']], urlencode($curdir), urlencode($val['name']),
               $val['name'],
               $val['mtime']);
       }

       ?>

    </tbody>
</table>
